package backend.Register;


public class RISCVoperand {
    private boolean needcolor = true;
    private int color = -1;
    //溢出
    private int spillspace = -1;

    private OperandType operandType;
    String name;

    public RISCVoperand(OperandType operandType, String name) {
        this.operandType = operandType;
        this.name = name;
    }
    public RISCVoperand(OperandType operandType) {
        this.operandType = operandType;
    }
    public RISCVoperand() {
    }

    public OperandType operandType() {
        return operandType;
    }


    public boolean isColored(){return this.needcolor;}

    public int getColor() {
        return color;
    }

    public void setColor(int color) {
        this.color = color;
    }

    public int getSpillspace() {
        return spillspace;
    }

    public void setSpillspace(int spillspace) {
        this.spillspace = spillspace;
    }

    public void setNeedcolor(boolean no){
        this.needcolor = no;
    }
}
